package com.tenbent.product.center.insures.service.impl;

import com.tenbent.product.base.dto.change.ChangeBoToDto;
import com.tenbent.product.base.service.impl.BaseServiceImpl;
import com.tenbent.product.center.insures.bo.SafeguardCategory;
import com.tenbent.product.center.insures.dto.SafeguardCategoryDto;
import com.tenbent.product.center.insures.mapper.SafeguardCategoryMapper;
import com.tenbent.product.center.insures.service.SafeguardCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by ThinkPad on 2017/8/21.
 */
@Service(value = "safeguardCategoryServiceImpl")
public class SafeguardCategoryServiceImpl extends BaseServiceImpl<SafeguardCategory>
		implements SafeguardCategoryService {

	public SafeguardCategoryServiceImpl() {
		this.setClazz(SafeguardCategory.class);
	}

	@Autowired
	private SafeguardCategoryMapper safeguardCategoryMapper;

	@Override
	public List<SafeguardCategoryDto> findSafeguardCategoryByCode(String typeCode) {

		SafeguardCategory query = new SafeguardCategory();
		query.setTypeCode(typeCode);
		return change.changesToDTOList(this.queryObj(query), SafeguardCategoryDto.class);
	}
}
